package com.dy.controller;

import com.dy.common.R;
import com.dy.utils.Oss_chengdu_blog;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * ClassName:CommonController
 * Package:com.dy.controller
 * Description:
 *
 * @Date:2022/8/4 19:06
 * @Author:dy
 */
@RestController
@RequestMapping("/common")
public class CommonController {

    @PostMapping("/upload")
    public R<String> upload(MultipartFile file){
        String s = Oss_chengdu_blog.uploadFile(file);
        return R.success(s);
    }


}
